package com.gm.wholesale.module.good.view;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
import com.gm.wholesale.R;
public class GoodItemTagView extends AppCompatTextView {
    public GoodItemTagView(Context context) {
        super(context);
    }

    public GoodItemTagView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public void showGreenText(String text){
        setTextColor(getResources().getColor(R.color.color_06C160));
        setBackground(getResources().getDrawable(R.drawable.good_item_tag_green_shap));
        setText(text);
    }

    public void showRedText(String text){
        setBackground(getResources().getDrawable(R.drawable.good_item_tag_red_shap));
        setTextColor(getResources().getColor(R.color.color_FE5000));
        setText(text);
    }
}
